import request from '@/utils/request'
// 获取部门列表
export function getdepartments() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 删除部门
export function getdelDep(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}
/**
 *
 * @param {*} data  添加部门信息
 * @returns
 */
export function postAddDepartment(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
/**
 *
 * @param {*} data  添加部门信息
 * @returns
 */
export function getAddDepartmenByid(id) {
  return request({
    url: '/company/department/' + id,
    method: 'GET'
  })
}
/**
 *
 * @param {id} data  修改部门信息
 * @returns
 */
export function getAddModify(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}
